package com.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import com.entity.*;
import com.dao.*;
import java.util.*;
@Service
public class BookService {
	@Resource
	private BookDao dao;
	@Resource
	private RecBookDao rdao;
	@Resource
	private HotBookDao hdao;
	@Resource
	private NewBookDao ndao;
	public List<RecBook> getRecommendBooks(){
		return rdao.getRecBooks();
	}
	
	public List<HotBook> getHotBooks(){
		return hdao.getHotBooks();
	}
	
	public List<NewBook> getNewBooks(){
		return ndao.getNewBooks();
	}
	
	public Book getBookById(String id){
		return dao.getBook(Integer.parseInt(id));
	}
}
